<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="PyfntbpedviaticCreateDlg" widgetVar="PyfntbpedviaticCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{myBundle.CreatePyfntbpedviaticTitle}">

            <h:form id="PyfntbpedviaticCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{pyfntbpedviaticController.selected != null}">

                        <p:outputLabel value="#{myBundle.CreatePyfntbpedviaticLabel_observaciones}" for="observaciones" />
                        <p:inputText id="observaciones" value="#{pyfntbpedviaticController.selected.observaciones}" title="#{myBundle.CreatePyfntbpedviaticTitle_observaciones}" />

                        <p:outputLabel value="#{myBundle.CreatePyfntbpedviaticLabel_fechaini}" for="fechaini" />
                        <p:calendar id="fechaini" pattern="MM/dd/yyyy" value="#{pyfntbpedviaticController.selected.fechaini}" title="#{myBundle.EditPyfntbpedviaticTitle_fechaini}" required="true" requiredMessage="#{myBundle.EditPyfntbpedviaticRequiredMessage_fechaini}" showOn="button"/>

                        <p:outputLabel value="#{myBundle.CreatePyfntbpedviaticLabel_fechafin}" for="fechafin" />
                        <p:calendar id="fechafin" pattern="MM/dd/yyyy" value="#{pyfntbpedviaticController.selected.fechafin}" title="#{myBundle.EditPyfntbpedviaticTitle_fechafin}"  showOn="button"/>

                        <p:outputLabel value="#{myBundle.CreatePyfntbpedviaticLabel_pyfntbreqviaticoid}" for="pyfntbreqviaticoid" />
                        <p:selectOneMenu id="pyfntbreqviaticoid" value="#{pyfntbpedviaticController.selected.pyfntbreqviaticoid}" required="true" requiredMessage="#{myBundle.EditPyfntbpedviaticRequiredMessage_pyfntbreqviaticoid}">
                            <f:selectItem itemLabel="#{myBundle.SelectOneMessage}"/>
                            <f:selectItems value="#{pyfntbreqviaticoController.items}"
                                           var="pyfntbreqviaticoidItem"
                                           itemValue="#{pyfntbreqviaticoidItem}"
                                           itemLabel="#{pyfntbreqviaticoidItem.pyfntbreqviaticoid.toString()}"
                                           />
                            <f:converter binding="#{pyfntbreqviaticoConverter}"/>
                        </p:selectOneMenu>

                        <p:outputLabel value="#{myBundle.CreatePyfntbpedviaticLabel_pyfntbcostviatid}" for="pyfntbcostviatid" />
                        <p:selectOneMenu id="pyfntbcostviatid" value="#{pyfntbpedviaticController.selected.pyfntbcostviatid}" required="true" requiredMessage="#{myBundle.EditPyfntbpedviaticRequiredMessage_pyfntbcostviatid}">
                            <f:selectItem itemLabel="#{myBundle.SelectOneMessage}"/>
                            <f:selectItems value="#{pyfntbcostviatController.items}"
                                           var="pyfntbcostviatidItem"
                                           itemValue="#{pyfntbcostviatidItem}"
                                           itemLabel="#{pyfntbcostviatidItem.descripcion.toString()}"
                                           />
                            <f:converter binding="#{pyfntbcostviatConverter}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{pyfntbpedviaticController.saveNew}" value="#{myBundle.Save}" update="display,:PyfntbpedviaticListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,PyfntbpedviaticCreateDialog);"/>
                    <p:commandButton value="#{myBundle.Cancel}" onclick="PyfntbpedviaticCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
